#!/bin/bash

###############case11################
case11_expect="feature_map:"
check_results_case11=`./register.sh fbbreg.jpg fbb`
if [[ $check_results_case11 == *$case11_expect* ]] 
then 
    echo "case11 calculate face success "
else 
    echo "case11 calculate face fail"
 fi

###############case12################


case12_expect="user name: fbb, state: already registered."
check_results_case12=`./register.sh fbbreco.jpg fbb`
if [[ $check_results_case12 == *$case12_expect* ]] 
then 
    echo "case12 Output corresponding success "
else 
    echo "case12 Output corresponding fail"
 fi

###############case13################


case13_expect="matched!"
check_results_case13=`./run.sh fbbreco.jpg`
if [[ $check_results_case13 == *$case13_expect* ]] 
then 
    echo "case13 match success "
else 
    echo "case13 match fail"
 fi

###############case14################


case14_expect="not matched."
check_results_case14=`./run.sh ldhreg.jpg`
if [[ $check_results_case14 == *$case14_expect* ]] 
then 
    echo "case14 not matched  success "
else 
    echo "case14 not matched fail"
 fi

###############case15################


case15_expect="please register first."
check_results_case15=`./run.sh ldhreg.jpg`
if [[ $check_results_case15 == *$case15_expect* ]] 
then 
    echo "case15 prompts to register success "
else 
    echo "case15 prompts to register fail"
 fi
